/**
 * Copyright (c) 2016-2100 yunclouds
 */
package com.yunqian.redot.domain;

import com.yunqian.model.BaseModel;
import com.yunqian.redot.constant.Tables;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 客户门票订单记录
 *
 * @author zsy
 * 2018-09-29 15:55:07
 */
@Data
@Entity
@Table(name = Tables.TICKET_ORDER)
@EqualsAndHashCode(callSuper = false)
public class TicketOrder extends BaseModel<Long> {

    /**
     * 状态
     */
    @Column(name = "status")
    private Integer status = 1;
    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark;
    /**
     * 排序号
     */
    @Column(name = "sort_num")
    private Integer sortNum;
    /**
     * 订单号
     */
    @Column(name = "order_no")
    private String orderNo;
    /**
     * 客户id
     */
    @Column(name = "customer_id")
    private Long customerId;
    /**
     * 参观人数
     */
    @Column(name = "quantity")
    private Integer quantity;
    /**
     * 票价（单价）
     */
    @Column(name = "price")
    private BigDecimal price;
    /**
     * 总票价
     */
    @Column(name = "total_price")
    private BigDecimal totalPrice;
    /**
     * 付款时间
     */
    @Column(name = "pay_time")
    private Date payTime;
    /**
     * 门票包含的基础票数组字符串
     */
    @Column(name = "relate_ticket_arr")
    private String relateTicketArr;
    /**
     * 关联门票id-不一定有
     */
    @Column(name = "ticket_id")
    private Long ticketId;
    /**
     * 取票验证码
     */
    @Column(name = "ticket_code")
    private String ticketCode;
    /**
     * 取票二维码key
     */
    @Column(name = "ticket_qr_code")
    private String ticketQrCode;
    /**
     * 退款状态
     */
    @Column(name = "refund_status")
    private Integer refundStatus = 1;
    /**
     * 退款原因
     */
    @Column(name = "refund_reason")
    private String refundReason;
    /**
     * 退款结果
     */
    @Column(name = "refund_result")
    private String refundResult;
    /**
     * 申请时间
     */
    @Column(name = "apply_time")
    private Date applyTime;
    /**
     * 审核时间
     */
    @Column(name = "audit_time")
    private Date auditTime;
    /**
     * zpt订单取消状态 0.订单未找到 1.订单取消成功 2.订单取消审核中 3.订单取消失败
     */
    @Column(name = "state")
    private Integer state;

    public TicketOrder() {
    }

}
